package 链表;

public class MyLinkedListDemo {
    public static void main(String[] args) {
        MyLinkedList linkedList = new MyLinkedList();
        linkedList.add("1");
        linkedList.add("2");
        linkedList.add("3");
        System.out.println(linkedList);
        /*linkedList.add(0 , "100");
        linkedList.add(4, "200");
        System.out.println(linkedList);
        String remove = linkedList.remove(0);
        System.out.println(remove);
        System.out.println(linkedList);
        linkedList.remove(3);
        System.out.println(linkedList);
        boolean remove1 = linkedList.remove("3");
        System.out.println(remove1);
        System.out.println(linkedList);
        String s = linkedList.get(1);
        System.out.println(s);
        System.out.println(linkedList.contains("2"));
        linkedList.clear();
        System.out.println(linkedList.size());
        System.out.println(linkedList.isEmpty());*/
        System.out.println(linkedList.lastIndexOf("3"));
        System.out.println(linkedList.lastIndexOf("2"));
        System.out.println(linkedList.lastIndexOf("1"));
        System.out.println(linkedList.lastIndexOf("3"));

    }
}
